package com.notepad.ui;

import com.notepad.R;

import android.app.ActionBar;
import android.app.Activity;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.view.MenuItem;

public class AboutActivity extends Activity {
	private ActionBar mActionBar;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.about);
		initActionBar();
	}

	private void initActionBar() {
		mActionBar = getActionBar();
		mActionBar.setBackgroundDrawable(new ColorDrawable(getResources()
				.getColor(R.color.pink_normal)));
		mActionBar.setDisplayHomeAsUpEnabled(true);
		mActionBar.setHomeButtonEnabled(true);
		mActionBar.setDisplayShowHomeEnabled(true);
		mActionBar.setTitle(R.string.main_menu_title_about);

	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
		case android.R.id.home:
			finish();
			break;
			}
		return super.onOptionsItemSelected(item);
	}

}
